package com.gs.commentvl.users.service;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gs.commentvl.dao.MemberDao;
import com.gs.commentvl.model.Member;

@Service("memberServiceImpl")
public class MemberServiceImpl extends GenericService implements MemberService{
	
	@Autowired
	private MemberDao memberDao;
	
	@Override
	public Member registerMember(Member member) {
		
		memberDao.addMemeber("userName", member);		
		return member;
	}

	@Override
	public Member login(String userName, String password) {
		Member mem = memberDao.getMemberByLogin(userName, password);
		if (mem == null) {
			//action
			return null;
		}
		return mem;
	}
	
	
}
